package com.yjd.comm.user.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.yjd.comm.base.model.PagerModel;
import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.user.dto.MarketingUserDto;
import com.yjd.comm.user.dto.UserRankDto;
import com.yjd.comm.user.dto.UserSession;
import com.yjd.comm.user.model.UserMapCountModel;
import com.yjd.comm.user.model.UserModel;

/**
 * <b>description</b>：系统菜单业务接口<br>
 * <b>time</b>：2014-11-05 11:45:03 <br>
 * <b>author</b>： renbangjie_vip@163.com
 */
public interface IUserService extends IBaseService {
	
	/**
	 * 根据身份证查询用户信息
	* @param certNo
	* @return UserModel
	 * @throws Exception 
	 */
	public UserModel getUserModelByCertNo(String certNo) throws Exception;
	
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public UserModel insert(UserModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(UserModel model) throws Exception;
	
	
	/**
	 * 登录时更新用户信息
	* @param model
	* @return int
	* @throws Exception
	 */
	public int updateLoginInfo(UserModel model) throws Exception;
	
	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public int delete(Long userId) throws Exception;

	/**
	 * 获取分页数据
	 * 
	 * @param map
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings({ "rawtypes" })
	public PagerModel getDtoPageModel(Map paramMap) throws Exception;
	
	/**
	 * 获取用户信息和实名认证信息
	* @param idUser
	* @return UserSession
	 * @throws Exception 
	 */
	public UserSession getUserSession(Long idUser) throws Exception;
	
	
	public Long getTotalUserCount() throws Exception;

	/**
	 * 
	* 获取新增用户统计
	* @param paramMap
	* @param b
	* @return
	* @throws Exception
	 */
	public Long getNewUserCount(Map paramMap, boolean b) throws Exception;
	
	/**
	 * 根据用户名查询用户信息
	* @param uName
	* @return UserModel
	 * @throws Exception 
	 */
	public UserModel getUserModelByName(String uName) throws Exception;
	
	/**
	 * 根据电话号码查询用户信息
	* @param uName
	* @return UserModel
	 * @throws Exception 
	 */
	public UserModel getUserModelByMobile(String mobile) throws Exception;
	
	
	/**
	 * 根据邮箱查询用户信息
	* @param uName
	* @return UserModel
	 * @throws Exception 
	 */
	public UserModel getUserModelByEmail(String email) throws Exception;
	
	/**
	 * 对用户表的某个字典进行添加操作
	 * 
	 * @param user_id
	 *            用户id，必填
	 * @param userModel
	 *            用户对象
	 * @return
	 */
	public int incrUserByUserId(Long user_id, UserModel userModel) throws Exception;
	
	
	/**
	 * 营销短信查询用户信息
	* @param paramMap
	* @return PagerModel
	* @throws Exception
	 */
	public PagerModel getMarketPagerModel(Map paramMap) throws Exception;
	
	/**
	 * 发送营销短信
	* @param paramMap 查询参数
	* @param title 短信标题
	* @param content 短信内容
	* @param time 发送时间,为空立即发送
	* @return boolean
	* @throws Exception
	 */
	public List<UserModel> sendMessage(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * 
	* 获取用户地图统计数据
	* @return
	 * @throws Exception 
	 */
	public List<UserMapCountModel> getUserMapCount(Map<Object,Object> parm) throws Exception;
	
	/**
	 * 修改交易密码
	* @param idUser 用户号
	* @param password 密码
	* @return session
	 * @throws Exception 
	 */
	public boolean modifyPayPassword(Long idUser, String password) throws Exception;
	
	/**
	 * 更新账号锁状态
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public int updateUserLock(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * 
	 *更新用户类型
	* @param idUser 用户id
	* @param uType 用户类型 参考 com.yjd.comm.enums.UserEnums.UserType
	* @return boolean
	* @throws Exception
	 */
	public boolean updateUserType(long idUser, int uType) throws Exception;
	
	/**
	 * 获取排名用户
	 * @param type
	 * @param paramMap
	 * @return
	 */
	public List<UserRankDto> getRankUsers(int type,Map<String, Object> paramMap)throws Exception;
	
}
